from filemanager.forms import UploadFileForm
from filemanager.models import FileModel

def handle_uploaded_file(f): # Handle uploaded file in chunks, if given file.
    destination = open('files/'+f.name, 'wb+')
    for chunk in f.chunks():
        destination.write(chunk)
    destination.close()
